package com.biostime.qdingding.modules.qd.service;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.biostime.qdingding.common.service.CrudService;
import com.biostime.qdingding.modules.qd.dao.CoursethemeDao;
import com.biostime.qdingding.modules.qd.entity.Coursetheme;

/**
 * 课程主题Service
 * @author king
 * @version 2015-11-05
 */
@Service
@Transactional(readOnly = true)
public class CoursethemeService extends CrudService<CoursethemeDao, Coursetheme> {
	@Override
	public List<Coursetheme> findList(Coursetheme entity) {
		dataScopeFilter(entity, "dsf", "id=a.center_id", "id=a.create_by");
		
		return super.findList(entity);
	}

	public List<String> getThemeNames(String string, String centerId) {
		List<String> themes = dao.getThemeNamesOf(string, centerId);
		
		return themes;
	}

	public List<Map<String, String>> getTheme(String serial, String level, String theme, int centerId) {
		return dao.getTheme(serial, level, theme, centerId);
	}
}
